package com.exchange.View;

import android.view.GestureDetector;
import android.view.MotionEvent;
import android.view.View;
import android.view.View.OnTouchListener;
import com.exchange.Public.n;

class g
  implements View.OnTouchListener
{
  int a;
  int b;
  boolean c;

  public boolean onTouch(View paramView, MotionEvent paramMotionEvent)
  {
    int k;
    n.c("Panel2", "state: " + t.a(this.d) + " x: " + paramMotionEvent.getX() + " y: " + paramMotionEvent.getY());
    int i = paramMotionEvent.getAction();
    if (i == 0)
    {
      this.a = 0;
      this.b = 0;
      if (!(this.d.o))
      {
        if (t.b(this.d) != 1)
          break label158;
        if (t.c(this.d) != 0)
          break label152;
        k = -1;
        this.b = k;
      }
      this.c = true;
    }
    while (true)
    {
      label152: label158: int j;
      while (true)
      {
        if ((!(t.g(this.d).onTouchEvent(paramMotionEvent))) && (i == 1))
          this.d.post(this.d.t);
        return false;
        k = 1;
      }
      if (t.c(this.d) == 2)
        j = -1;
      while (true)
      {
        while (true)
          this.a = j;
        j = 1;
      }
      if (this.c)
      {
        this.d.e();
        this.a *= t.d(this.d);
        this.b *= t.e(this.d);
        t.f(this.d).a(this.a, this.b);
        this.c = false;
        this.a = (-this.a);
        this.b = (-this.b);
      }
      paramMotionEvent.offsetLocation(this.a, this.b);
    }
  }
}